import Vue from 'vue'
import App from './App'
import uView from "uview-ui";
import tools from '@/common/utils/util.js';
import stereo from "./pages/index/components/stereo.vue"
import headerBox from './components/header/header-box.vue';
import minRouter from '@/common/router'

import {API_URL,IMG_URL, images,UPLOAD} from 'env.js'

Vue.use(uView);
Vue.use(stereo);
Vue.component('headerBox',headerBox)
Vue.config.productionTip = false
uni.$showMsg = (title = "数据加载失败!", duration = 2000) => {
	uni.showToast({
		title,
		duration,
		icon: "none"
	})
}
uni.$showLoading = (title='') => {
	uni.showLoading({
		title,
		mask: true
	});
}

Vue.prototype.$API_URL = API_URL;
Vue.prototype.$IMG_URL = IMG_URL;
Vue.prototype.$images = images;
Vue.prototype.$UPLOAD = UPLOAD;

Vue.prototype.$tools = tools;
// Vue.prototype.$tools = tools;

App.mpType = 'app'

const app = new Vue({
	minRouter,
	...App
})
app.$mount()
